﻿namespace io.gitee.springsongs
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Animal bird = new Bird();
            bird.Description();
            Animal fish = new Fish();
            fish.Description();
        }

        public class Animal
        {
            public string? Name { get; set; }
            public string? Type { get; set; }
            public void Description()
            {
                Console.WriteLine($"{Name}是{Type}");
            }
        }

        public class Bird : Animal
        {
            public Bird()
            {
                this.Name="天鹅";
                this.Type = "鸟类";
            }
        }

        public class Fish : Animal
        {
            public Fish()
            {
                this.Name = "非洲鱼";
                this.Type = "鱼类";
            }
        }
    }
}